<h1>Listing events</h1>

<% form_for @department_abbreviation, :url => {:action => "create"} do |f| %>
<table>
  <tr>
    <th>Department</th>
    <th>Abbreviation</th>
    <th>Actions</th>
  </tr>

<% @department_abbreviations.each do |department_abbreviation| %>
  <tr>
    <td><%=h department_abbreviation.department %></td>
    <td><%=h department_abbreviation.abbreviation %></td>
    <td><%= link_to 'Delete', department_abbreviation, :method => :delete %></td>
  </tr>
<% end %>
<tr>
  <td>
    <%= f.text_field :department %>
  </td>
  <td>
    <%= f.text_field :abbreviation %>
  </td>
  <td>
    <%= f.submit 'Create' %>
  </td>
</tr>
</table>
<% end %>

<br />

<%= link_to 'Fetch list from UC Berkeley', :action => "fetch_list" %>